import http from '@ohos.net.http'

class HttpRequest {
  baseUrl="http://10.161.9.80:7015/videosimple/getRecommendSimpleVideo?page=1&pagesize=10"
  getData(){
    return new Promise((resolve,reject)=>{
      let request=http.createHttp()
      request.request(this.baseUrl,{
        method:http.RequestMethod.GET
      }).then((res)=>{
        resolve(JSON.parse(res.result.toString()))
      })
    })
  }
}
let httpRequest=new HttpRequest()
export default httpRequest as HttpRequest